#pragma once
#include <Windows.h>
#include <iostream>
#include <unordered_map>
#include "../cs2 dumper/client_dll.hpp"

namespace C_BasePlayerWeapon_
{
    inline DWORD m_nNextPrimaryAttackTick = cs2_dumper::schemas::client_dll::C_BasePlayerWeapon::m_nNextPrimaryAttackTick;
    inline DWORD m_flNextPrimaryAttackTickRatio = cs2_dumper::schemas::client_dll::C_BasePlayerWeapon::m_flNextPrimaryAttackTickRatio;
    inline DWORD m_nNextSecondaryAttackTick = cs2_dumper::schemas::client_dll::C_BasePlayerWeapon::m_nNextSecondaryAttackTick;
    inline DWORD m_flNextSecondaryAttackTickRatio = cs2_dumper::schemas::client_dll::C_BasePlayerWeapon::m_flNextSecondaryAttackTickRatio;
    inline DWORD m_iClip1 = cs2_dumper::schemas::client_dll::C_BasePlayerWeapon::m_iClip1;
    inline DWORD m_iClip2 = cs2_dumper::schemas::client_dll::C_BasePlayerWeapon::m_iClip2;
    inline DWORD m_pReserveAmmo = cs2_dumper::schemas::client_dll::C_BasePlayerWeapon::m_pReserveAmmo;
}

namespace C_CSWeaponBase_
{
    inline DWORD m_iWeaponGameplayAnimState = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_iWeaponGameplayAnimState;
    inline DWORD m_flWeaponGameplayAnimStateTimestamp = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flWeaponGameplayAnimStateTimestamp;
    inline DWORD m_flInspectCancelCompleteTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flInspectCancelCompleteTime;
    inline DWORD m_bInspectPending = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bInspectPending;
    inline DWORD m_bInspectShouldLoop = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bInspectShouldLoop;
    inline DWORD m_flCrosshairDistance = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flCrosshairDistance;
    inline DWORD m_iAmmoLastCheck = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_iAmmoLastCheck;
    inline DWORD m_nLastEmptySoundCmdNum = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_nLastEmptySoundCmdNum;
    inline DWORD m_bFireOnEmpty = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bFireOnEmpty;
    inline DWORD m_OnPlayerPickup = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_OnPlayerPickup;
    inline DWORD m_weaponMode = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_weaponMode;
    inline DWORD m_flTurningInaccuracyDelta = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flTurningInaccuracyDelta;
    inline DWORD m_vecTurningInaccuracyEyeDirLast = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_vecTurningInaccuracyEyeDirLast;
    inline DWORD m_flTurningInaccuracy = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flTurningInaccuracy;
    inline DWORD m_fAccuracyPenalty = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_fAccuracyPenalty;
    inline DWORD m_flLastAccuracyUpdateTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flLastAccuracyUpdateTime;
    inline DWORD m_fAccuracySmoothedForZoom = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_fAccuracySmoothedForZoom;
    inline DWORD m_iRecoilIndex = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_iRecoilIndex;
    inline DWORD m_flRecoilIndex = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flRecoilIndex;
    inline DWORD m_bBurstMode = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bBurstMode;
    inline DWORD m_flLastBurstModeChangeTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flLastBurstModeChangeTime;
    inline DWORD m_nPostponeFireReadyTicks = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_nPostponeFireReadyTicks;
    inline DWORD m_flPostponeFireReadyFrac = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flPostponeFireReadyFrac;
    inline DWORD m_bInReload = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bInReload;
    inline DWORD m_flDroppedAtTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flDroppedAtTime;
    inline DWORD m_bIsHauledBack = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bIsHauledBack;
    inline DWORD m_bSilencerOn = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bSilencerOn;
    inline DWORD m_flTimeSilencerSwitchComplete = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flTimeSilencerSwitchComplete;
    inline DWORD m_iOriginalTeamNumber = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_iOriginalTeamNumber;
    inline DWORD m_iMostRecentTeamNumber = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_iMostRecentTeamNumber;
    inline DWORD m_bDroppedNearBuyZone = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bDroppedNearBuyZone;
    inline DWORD m_flNextAttackRenderTimeOffset = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flNextAttackRenderTimeOffset;
    inline DWORD m_bClearWeaponIdentifyingUGC = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bClearWeaponIdentifyingUGC;
    inline DWORD m_bVisualsDataSet = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bVisualsDataSet;
    inline DWORD m_bUIWeapon = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bUIWeapon;
    inline DWORD m_nCustomEconReloadEventId = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_nCustomEconReloadEventId;
    inline DWORD m_nextPrevOwnerUseTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_nextPrevOwnerUseTime;
    inline DWORD m_hPrevOwner = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_hPrevOwner;
    inline DWORD m_nDropTick = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_nDropTick;
    inline DWORD m_bWasActiveWeaponWhenDropped = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bWasActiveWeaponWhenDropped;
    inline DWORD m_donated = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_donated;
    inline DWORD m_fLastShotTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_fLastShotTime;
    inline DWORD m_bWasOwnedByCT = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bWasOwnedByCT;
    inline DWORD m_bWasOwnedByTerrorist = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_bWasOwnedByTerrorist;
    inline DWORD m_flNextClientFireBulletTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flNextClientFireBulletTime;
    inline DWORD m_flNextClientFireBulletTime_Repredict = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flNextClientFireBulletTime_Repredict;
    inline DWORD m_IronSightController = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_IronSightController;
    inline DWORD m_iIronSightMode = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_iIronSightMode;
    inline DWORD m_flLastLOSTraceFailureTime = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flLastLOSTraceFailureTime;
    inline DWORD m_flWatTickOffset = cs2_dumper::schemas::client_dll::C_CSWeaponBase::m_flWatTickOffset;
}

namespace C_CSWeaponBaseGun_
{
    inline DWORD m_zoomLevel = cs2_dumper::schemas::client_dll::C_CSWeaponBaseGun::m_zoomLevel;
    inline DWORD m_iBurstShotsRemaining = cs2_dumper::schemas::client_dll::C_CSWeaponBaseGun::m_iBurstShotsRemaining;
    inline DWORD m_iSilencerBodygroup = cs2_dumper::schemas::client_dll::C_CSWeaponBaseGun::m_iSilencerBodygroup;
    inline DWORD m_silencedModelIndex = cs2_dumper::schemas::client_dll::C_CSWeaponBaseGun::m_silencedModelIndex;
    inline DWORD m_inPrecache = cs2_dumper::schemas::client_dll::C_CSWeaponBaseGun::m_inPrecache;
    inline DWORD m_bNeedsBoltAction = cs2_dumper::schemas::client_dll::C_CSWeaponBaseGun::m_bNeedsBoltAction;
    inline DWORD m_nRevolverCylinderIdx = cs2_dumper::schemas::client_dll::C_CSWeaponBaseGun::m_nRevolverCylinderIdx;
}
static const std::unordered_map<std::string, std::ptrdiff_t> C_BasePlayerWeapon_OffsetMap = {
    {"m_nNextPrimaryAttackTick", C_BasePlayerWeapon_::m_nNextPrimaryAttackTick},
    {"m_flNextPrimaryAttackTickRatio", C_BasePlayerWeapon_::m_flNextPrimaryAttackTickRatio},
    {"m_nNextSecondaryAttackTick", C_BasePlayerWeapon_::m_nNextSecondaryAttackTick},
    {"m_flNextSecondaryAttackTickRatio", C_BasePlayerWeapon_::m_flNextSecondaryAttackTickRatio},
    {"m_iClip1", C_BasePlayerWeapon_::m_iClip1},
    {"m_iClip2", C_BasePlayerWeapon_::m_iClip2},
    {"m_pReserveAmmo", C_BasePlayerWeapon_::m_pReserveAmmo}
};

static const std::unordered_map<std::string, std::ptrdiff_t> C_CSWeaponBase_OffsetMap = {
    {"m_iWeaponGameplayAnimState", C_CSWeaponBase_::m_iWeaponGameplayAnimState},
    {"m_flWeaponGameplayAnimStateTimestamp", C_CSWeaponBase_::m_flWeaponGameplayAnimStateTimestamp},
    {"m_flInspectCancelCompleteTime", C_CSWeaponBase_::m_flInspectCancelCompleteTime},
    {"m_bInspectPending", C_CSWeaponBase_::m_bInspectPending},
    {"m_bInspectShouldLoop", C_CSWeaponBase_::m_bInspectShouldLoop},
    {"m_flCrosshairDistance", C_CSWeaponBase_::m_flCrosshairDistance},
    {"m_iAmmoLastCheck", C_CSWeaponBase_::m_iAmmoLastCheck},
    {"m_nLastEmptySoundCmdNum", C_CSWeaponBase_::m_nLastEmptySoundCmdNum},
    {"m_bFireOnEmpty", C_CSWeaponBase_::m_bFireOnEmpty},
    {"m_OnPlayerPickup", C_CSWeaponBase_::m_OnPlayerPickup},
    {"m_weaponMode", C_CSWeaponBase_::m_weaponMode},
    {"m_flTurningInaccuracyDelta", C_CSWeaponBase_::m_flTurningInaccuracyDelta},
    {"m_vecTurningInaccuracyEyeDirLast", C_CSWeaponBase_::m_vecTurningInaccuracyEyeDirLast},
    {"m_flTurningInaccuracy", C_CSWeaponBase_::m_flTurningInaccuracy},
    {"m_fAccuracyPenalty", C_CSWeaponBase_::m_fAccuracyPenalty},
    {"m_flLastAccuracyUpdateTime", C_CSWeaponBase_::m_flLastAccuracyUpdateTime},
    {"m_fAccuracySmoothedForZoom", C_CSWeaponBase_::m_fAccuracySmoothedForZoom},
    {"m_iRecoilIndex", C_CSWeaponBase_::m_iRecoilIndex},
    {"m_flRecoilIndex", C_CSWeaponBase_::m_flRecoilIndex},
    {"m_bBurstMode", C_CSWeaponBase_::m_bBurstMode},
    {"m_flLastBurstModeChangeTime", C_CSWeaponBase_::m_flLastBurstModeChangeTime},
    {"m_nPostponeFireReadyTicks", C_CSWeaponBase_::m_nPostponeFireReadyTicks},
    {"m_flPostponeFireReadyFrac", C_CSWeaponBase_::m_flPostponeFireReadyFrac},
    {"m_bInReload", C_CSWeaponBase_::m_bInReload},
    {"m_flDroppedAtTime", C_CSWeaponBase_::m_flDroppedAtTime},
    {"m_bIsHauledBack", C_CSWeaponBase_::m_bIsHauledBack},
    {"m_bSilencerOn", C_CSWeaponBase_::m_bSilencerOn},
    {"m_flTimeSilencerSwitchComplete", C_CSWeaponBase_::m_flTimeSilencerSwitchComplete},
    {"m_iOriginalTeamNumber", C_CSWeaponBase_::m_iOriginalTeamNumber},
    {"m_iMostRecentTeamNumber", C_CSWeaponBase_::m_iMostRecentTeamNumber},
    {"m_bDroppedNearBuyZone", C_CSWeaponBase_::m_bDroppedNearBuyZone},
    {"m_flNextAttackRenderTimeOffset", C_CSWeaponBase_::m_flNextAttackRenderTimeOffset},
    {"m_bClearWeaponIdentifyingUGC", C_CSWeaponBase_::m_bClearWeaponIdentifyingUGC},
    {"m_bVisualsDataSet", C_CSWeaponBase_::m_bVisualsDataSet},
    {"m_bUIWeapon", C_CSWeaponBase_::m_bUIWeapon},
    {"m_nCustomEconReloadEventId", C_CSWeaponBase_::m_nCustomEconReloadEventId},
    {"m_nextPrevOwnerUseTime", C_CSWeaponBase_::m_nextPrevOwnerUseTime},
    {"m_hPrevOwner", C_CSWeaponBase_::m_hPrevOwner},
    {"m_nDropTick", C_CSWeaponBase_::m_nDropTick},
    {"m_bWasActiveWeaponWhenDropped", C_CSWeaponBase_::m_bWasActiveWeaponWhenDropped},
    {"m_donated", C_CSWeaponBase_::m_donated},
    {"m_fLastShotTime", C_CSWeaponBase_::m_fLastShotTime},
    {"m_bWasOwnedByCT", C_CSWeaponBase_::m_bWasOwnedByCT},
    {"m_bWasOwnedByTerrorist", C_CSWeaponBase_::m_bWasOwnedByTerrorist},
    {"m_flNextClientFireBulletTime", C_CSWeaponBase_::m_flNextClientFireBulletTime},
    {"m_flNextClientFireBulletTime_Repredict", C_CSWeaponBase_::m_flNextClientFireBulletTime_Repredict},
    {"m_IronSightController", C_CSWeaponBase_::m_IronSightController},
    {"m_iIronSightMode", C_CSWeaponBase_::m_iIronSightMode},
    {"m_flLastLOSTraceFailureTime", C_CSWeaponBase_::m_flLastLOSTraceFailureTime},
    {"m_flWatTickOffset", C_CSWeaponBase_::m_flWatTickOffset},
    {"m_zoomLevel", C_CSWeaponBaseGun_::m_zoomLevel },
    {"m_iBurstShotsRemaining", C_CSWeaponBaseGun_::m_iBurstShotsRemaining},
    {"m_iSilencerBodygroup", C_CSWeaponBaseGun_::m_iSilencerBodygroup},
    {"m_silencedModelIndex", C_CSWeaponBaseGun_::m_silencedModelIndex},
    {"m_inPrecache", C_CSWeaponBaseGun_::m_inPrecache},
    {"m_bNeedsBoltAction", C_CSWeaponBaseGun_::m_bNeedsBoltAction},
    {"m_nRevolverCylinderIdx", C_CSWeaponBaseGun_::m_nRevolverCylinderIdx}
};